<?
if(!ANTIHACK) die("ANTIHACK...");
$sel=query("select * from quangcao where position=3 and is_active=1 order by sort asc");
$i=0;
while($fsel=fetch($sel))
{
$fsel['count']=$i;
	$getqc=query("select * from link_quangcao where parent=".$fsel['id']);
	$img=array();
	$url=array();
	while($fgetqc=fetch($getqc))
	{
		$img[]=$fgetqc['img'];
		$url[]=baselink.'/clickads.php?id='.$fgetqc['id'].'&url='.$fgetqc['url'];
	}
	$fsel[img]=$img;
	$fsel[url]=$url;
	$qc[]=$fsel;
	$i++;
}
$smarty->assign("quangcao",$qc);

$smarty->display("footer.htm");
?>